
// declare function PromiseAll<T extends [] | readonly any[]>(values: T):
//   Promise<{
//     -readonly [P in keyof T]: T[P] extends Promise<infer U>? U: T[P]
//   }>
declare function PromiseAll<T extends any[]>(values: readonly [...T]): Promise<{
    [K in keyof T]: T[K] extends Promise<infer R> ? R : T[K]
  }>

  // const promiseAllTest1 = PromiseAll([1, 2, 3] as const)
  // const promiseAllTest2 = PromiseAll([1, 2, Promise.resolve(3)] as const)
  // const promiseAllTest3 = PromiseAll([1, 2, Promise.resolve(3)])
  // type t1 = typeof promiseAllTest1;
  // type t2 = typeof promiseAllTest2;
  // type t3 = typeof promiseAllTest3;

  
// -readonly ????